﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Themes/MasterPage.master" AutoEventWireup="true"
    CodeFile="ServerManger.aspx.cs" Inherits="DataServer_ServerManger" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TabTitle" runat="Server">
    <%=Resources.Resource.ServerManger%><%--服务数据管理--%>
    <asp:LinkButton ID="btn_Add" runat="server" Text="<%$Resources:Resource,btnAdd%>" OnClientClick="return Add();"/>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="Server">
    <div class="GridDivCss">
        <IMC:GridView ID="gvDataServer" runat="server" AllowPaging="true" AllowSorting="true"
            PageSize="12" DataSourceID="DataServerDS" OnRowCommand="gvDataServer_RowCommand">
            <Columns>
                <asp:TemplateField HeaderText="Name" ItemStyle-HorizontalAlign="Center">
                    <%--产品编号--%>
                    <ItemTemplate>
                        &nbsp;<asp:Label ID="lbl_Name" runat="server" Text='<%#Eval("Name")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Product" ItemStyle-HorizontalAlign="Center">
                    <%--产品编号--%>
                    <ItemTemplate>
                        &nbsp;<asp:Label ID="lbl_Product" runat="server" Text='<%#Eval("Product")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Provider" ItemStyle-HorizontalAlign="Center">
                    <%--产品编号--%>
                    <ItemTemplate>
                        &nbsp;<asp:Label ID="lbl_Provider" runat="server" Text='<%#Eval("Provider")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Data_Source" ItemStyle-HorizontalAlign="Center">
                    <%--产品编号--%>
                    <ItemTemplate>
                        &nbsp;<asp:Label ID="lbl_Data_Source" runat="server" Text='<%#Eval("Data_Source")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Modify_Date" ItemStyle-HorizontalAlign="Center">
                    <%--产品编号--%>
                    <ItemTemplate>
                        &nbsp;<asp:Label ID="lbl_Modify_Date" runat="server" Text='<%#Eval("Modify_Date")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Operation" ItemStyle-HorizontalAlign="Center">
                    <%--维护--%>
                    <ItemTemplate>
                        <asp:LinkButton ID="lbtn_del" runat="server" Text="<%$Resources:Resource,btnDel%>"
                            CommandName="Del" CommandArgument='<%#Eval("Name")%>' OnClientClick="return confirm('Can you Confirm')">
                        </asp:LinkButton>
                        <%--维护--%>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </IMC:GridView>
        <asp:ObjectDataSource ID="DataServerDS" TypeName="SMTC.BO.DataServer.DataServerServices"
            SelectMethod="GetServerList" runat="server">
            <SelectParameters>
                <asp:Parameter Name="name" Type="String" DefaultValue="" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <input id="btnPreview" runat="server" type="button" value="预览" cssclass="buttonbgtwo"
        style="display: none;" />
    <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender" runat="server" TargetControlID="btnPreview"
        PopupControlID="Panel1" BackgroundCssClass="modalBackground" CancelControlID="btnCancel"
        DropShadow="true" PopupDragHandleControlID="Panel3" />
    <asp:Panel ID="Panel1" runat="server" Width="580px" Style="display: none" CssClass="modalPopup">
        <asp:Panel ID="Panel3" runat="server" Style="cursor: move; background-color: #DDDDDD;
            border: solid 1px Gray; color: Black">
            <div class="tagdivhead" style="background-color: #D6E0EE; padding-top: 8px">
                <div class="divcenter">
                    <span>&nbsp;<asp:Label ID="lbtitle" runat="server" CssClass="querytextCss" Width="150px"
                        Height="16px" Text="Server Manger"></asp:Label>
                    </span>
                </div>
            </div>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="ModifytableCss">
                <tr>
                    <td colspan="6" style="height: 1px">
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="querytexttdCss">
                        IP
                    </td>
                    <td class="querycoltdCss">
                        <asp:TextBox ID="txtM_IP" runat="server" Width="120px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="querytexttdCss">
                        UserName
                    </td>
                    <td class="querycoltdCss">
                        <asp:TextBox ID="txtM_UserName" runat="server" Width="120px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="querytexttdCss">
                        PassWord
                    </td>
                    <td class="querycoltdCss">
                        <asp:TextBox ID="txtM_PassWord" runat="server" Width="120px" TextMode="Password"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" style="height: 1px">
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td colspan="4" style="padding-bottom: 3; padding-top: 3">
                        <asp:Button ID="btnUpd" runat="server" Text="<%$Resources:Resource,btnSave%>" OnClick="btnUpd_Click" />
                        <%--保 存--%>
                        &nbsp;&nbsp;
                        <asp:Button ID="btnCancel" runat="server" Text="<%$Resources:Resource,btnClear%>" />
                        <%--取 消--%>
                    </td>
                </tr>
                <tr>
                    <td colspan="6" style="height: 1px">
                        &nbsp;
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </asp:Panel>
    <script type="text/javascript">
        function Add() {

            document.getElementById("<%= txtM_IP.ClientID%>").value = "";
            document.getElementById("<%= txtM_UserName.ClientID%>").value = "";
            document.getElementById("<%= txtM_PassWord.ClientID%>").value = "";

            document.getElementById('<%= btnPreview.ClientID%>').click();
            return false;
        }
    </script>
</asp:Content>
